package com.tengju.bff.interfaces.covercharge.constant;
/**
 * 服务费周期交易表枚举类
 *
 * @author cj
 */
public enum ServiceWithdarwCycleAddTransOrderEnum {
    DEALING(0, "处理中"),
    SUCCESSFUL(1, "成功"),
    FAILURE(2, "失败"),
    UNKNOWN(3, "未知");

    private Integer code;
    private String desc;

    ServiceWithdarwCycleAddTransOrderEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }

    public static ServiceWithdarwCycleAddTransOrderEnum getStatusDesc (Integer code){
        for(ServiceWithdarwCycleAddTransOrderEnum statusEnum : (ServiceWithdarwCycleAddTransOrderEnum.values())){
            if(statusEnum.getCode().equals(code)){//如果传入的code与此枚举code相同，则返回此枚举
                return statusEnum;
            }
        }
        return null;
    }
}
